package pageobjectpattern;

import org.openqa.selenium.WebDriver;


public class LoginPage extends Page {
		private String loginButtonPath = "//*[@id='bxLogForm']/div/div[1]/form/p[3]/input";
		
        public LoginPage(WebDriver driver){
                super(driver);
                chooseAddress("http://profil.wp.pl");
        }
        
        public MainPage login(String login, String password){
        		
        		insertText("//*[@id='login']", login);
        		insertText("//*[@id='bxLogForm']/div/div[1]/form/p[2]/input", password);
                
                clickXPath(loginButtonPath);
                return new MainPage(driver);
        }
}

